package month4.day25;

import java.util.Collections;
import java.util.Scanner;

public class Text {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        Market market=new Market();
        while (true) {
            System.out.println("1:积分累计" + "2:积分兑换" + "3:查询剩余积分" + "4:修改密码" + "5:开卡" + "6:退出");
            int n=in.nextInt();
            if(n==1){

            }else if(n==2){

            }else if(n==3){
                System.out.println("输入用户名");
                String name=in.next();
                System.out.println("输入用户密码");
                String code=in.next();
                market.shengyui(name,code);
            }else if(n==4){
                System.out.println("输入用户名");
                String name=in.next();
                System.out.println("输入用户密码");
                String code=in.next();
                System.out.println("输入用户新密码");
                String newcode=in.next();
                market.xiugai(name,code,newcode);
            }else if(n==5){
                System.out.println("输入用户名");
                String name=in.next();
                System.out.println("输入用户密码");
                String code=in.next();
                //market.kaika(name,code);
                System.out.println("开卡"+(market.kaika(name,code)?"成功":"失败"));
            }else if(n==6){
                return;
            }else {
                System.out.println("输入用户名");
                String name=in.next();
                System.out.println("输入用户密码");
                String code=in.next();
                market.shanchu(name,code);
            }
        }


    }
}
